<!DOCTYPE html>
<html lang="en" xmlns:formatter="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>用户信息</title>
    <link rel="stylesheet" type="text/css" href="/jquery-easyui-1.3.3/themes/scientific/easyui.css">
    <link rel="stylesheet" type="text/css" href="/jquery-easyui-1.3.3/themes/icon.css">
    <script type="text/javascript" src="/jquery-easyui-1.3.3/jquery.min.js"></script>
    <script type="text/javascript" src="/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/jquery-easyui-1.3.3/jquery.edatagrid.js"></script>
    <script type="text/javascript" src="/js/common.js"></script>
    <script type="text/javascript" src="/js/user_info.js"></script>

    <title>用户信息</title>
</head>
<body style="margin: 1px">
<table id="dg" class="easyui-datagrid" data-options="pageSize:50"
       pagination="true" rownumbers="true"
       url="/userList" fit="true" toolbar="#tb">
    <thead data-options="frozen:true">
    <tr>
        <th field="cb" checkbox="true" align="center"></th>
    </tr>
    </thead>
    <thead>
    <tr>
        <th field="id" width="50" align="center" hidden="true">编号</th>
        <th field="userName" width="120" align="center">用户名</th>
        <!--        <th field="password" width="200" align="center">密码</th>-->
        <th field="trueName" width="120" align="center">真实姓名</th>
        <th field="email" width="200" align="center">电子邮箱</th>
        <th field="phone" width="120" align="center">电话号码</th>
        <th data-options="field:'roleName', width:120, align:'center', formatter:formatTrueName">角色名称</th>
    </tr>
    </thead>

</table>
<div id="tb">
    <div>
        <a href="javascript:openUserAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">创建</a>
        <a href="javascript:openUserModifyDialog()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
        <a href="javascript:deleteUser()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
    </div>
    <div>
        &nbsp;用户昵称：&nbsp;<input type="text" id="search-userName" size="20"
                                    onkeydown="if(event.keyCode==13) searchUser()"/>
        &nbsp;真实姓名：&nbsp;<input type="text" id="search-trueName" size="20"
                                    onkeydown="if(event.keyCode==13) searchUser()"/>
        &nbsp;邮箱：&nbsp;<input type="text" id="search-email" size="20"
                                onkeydown="if(event.keyCode==13) searchUser()"/>
        <a href="javascript:searchUser()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
    </div>
</div>


<div id="dlg" class="easyui-dialog" style="width:700px;height:450px;padding: 10px 20px"
     closed="true" buttons="#dlg-buttons">

    <form id="UserForm" method="post">
        <table cellspacing="8px">
            <tr>
                <td>用户昵称：</td>
                <td><input type="text" id="userName" name="userName" class="easyui-validatebox"
                           required="true"/>&nbsp;<font color="red">*</font></td>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                <td>真实姓名：</td>
                <td><input type="text" id="trueName" name="trueName" class="easyui-validatebox"
                           required="true"/>&nbsp;<font color="red">*</font></td>
            </tr>
            <tr>
                <td>密码：</td>
                <td><input type="text" id="password" name="password" class="easyui-validatebox"
                           required="true"/>&nbsp;<font color="red">*</font></td>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                <td>邮箱：</td>
                <td><input type="text" id="email" name="email" class="easyui-validatebox" required="true"/>&nbsp;<font
                        color="red">*</font></td>
            </tr>
            <tr>
                <td>电话：</td>
                <td><input type="text" id="phone" name="phone" class="easyui-validatebox" required="true"/>&nbsp;<font
                        color="red">*</font></td>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                <td>权限：</td>
                <td>
                    <select class="easyui-combobox" id="roleName" name="roleName" style="width: 154px" editable="false"
                            panelHeight="auto">
                        <option value="">请选择...</option>
                        <option value="系统管理员">系统管理员</option>
                        <option value="销售主管">销售主管</option>
                        <option value="销售员">销售员</option>
                        <option value="农场主">农场主</option>
                        <option value="饲养员">饲养员</option>
                        <option value="农场直接负责人">农场直接负责人</option>
                        <option value="合作方公司经理">合作方公司经理</option>
                    </select>&nbsp;<font color="red">*</font>
                </td>
            </tr>

        </table>
    </form>
</div>

<div id="dlg-buttons">
    <a href="javascript:saveUser()" class="easyui-linkbutton" iconCls="icon-btn-ok">保存</a>
    <a href="javascript:closeUserDialog()" class="easyui-linkbutton" iconCls="icon-btn-cancel">关闭</a>
</div>
</body>
</html>
